1. Field of the Invention
The present invention generally relates to printing and, more particularly, to a printing apparatus, a method for controlling a printing apparatus, and a storage medium.
2. Description of the Related Art
Information processing apparatuses having a wireless local area network (LAN) function such as printing apparatuses, personal computers (PCs), and portable terminals, have been increasing. The information processing apparatus having the wireless LAN function connects as a client to an access point, and via the access point, communicates with an external device.
The Wi-Fi Alliance has established a standard called Wi-Fi Direct (registered trademark). Wi-Fi Direct has defined a protocol for determining whether an information processing apparatus such as a printing apparatus and a PC operates as an access point or a client. Execution of the protocol automatically determines an information processing apparatus which is to be the access point and an information processing apparatus which is to be the client. The use of Wi-Fi Direct eliminates requirement for preparation of a specific access point, and enables direct wireless communication between the information processing apparatuses.
FIG. 1 simply illustrates a processing sequence in Wi-Fi Direct. Each of the printing apparatus and the portable terminal is an example of the information processing apparatuses that support Wi-Fi Direct.
In step S101, each of the printing apparatus and the portable terminal performs a device search to identify a communication partner. In step S102, the printing apparatus and the portable terminal identify the communication partners respectively, and the printing apparatus and the terminal determine which one is to be an access point (Group Owner) and which one is to be a client (Client). The processing in step S102 is called a role determination. In FIG. 1, it is assumed that as a result of the role determination in step S102, it is determined that the printing apparatus is to be the Group Owner, and the portable terminal is to be the Client.
In step S103, using Wi-Fi Protected Setup (WPS) specified by the Wi-Fi Alliance, the printing apparatus acting as the Group Owner provides parameters for communication to the portable terminal acting as the Client to share the parameters between the printing apparatus and the portable terminal. In step S104, using the parameters, the printing apparatus and the portable terminal perform secure connection.
When the secure connection is completed, in step S105, the printing apparatus and the printing terminal perform addressing for carrying out Internet Protocol (IP) communication. In this step, the printing apparatus acting as the Group Owner, operates as a dynamic host configuration protocol (DHCP) server, and assigns an IP address to the portable terminal acting as the Client.
The execution of the above-described processing establishes wireless communication between the printing apparatus and the portable terminal. The use of the wireless communication enables the printing apparatus and the portable terminal to directly communicate with each other without preparing a specific access point. Japanese Patent Application Laid-Open No. 2012-199884 discusses transmission and reception of audio data and photographic data using Wi-Fi Direct.
When the communication partner in Wi-Fi Direct is a printing apparatus, it is possible to send print data to the printing apparatus, and instruct the printing apparatus to print the print data. In performing the printing, various print settings, for example, color printing, two-sided printing, and N-up printing, are to be made. In Japanese Patent Application Laid-Open No. 2012-199884, however, there is no mention of a way how users perform the print setting.